%!TEX root = ./main.tex

\chapter{Getting started}

This chapter shows how to compile and run your first application. We are going to use the \textsc{Posix} port of Trampoline, Trampoline/\textsc{Posix}, that runs over a Linux or Mac OS X operating system. So we assume you are using a Linux or Mac OS X computer since Trampoline/Posix does not run over Windows\footnote{An API working like Unix signals is missing on Windows.}.

OSEK/VDX and \textsc{Autosar os} are static operating systems. That means the objects of the application, tasks, events, resources, \ldots, cannot be created or deleted during the execution of the application. All objects are statically defined and instead of forcing the user to describe the application in C, a work that can be error prone, a specific language is used, OIL or XML\footnote{for \textsc{Autosar}}. A compiler, \goil, is used to translate the description in the equivalent C structures. \goil\ performs verifications too.

\section{Compiling goil}

Before all, we need to compile \tool{goil}. \goil\ is located in the \file{goil} subdirectory. To compile \goil, go in the directory corresponding to your operating system, \file{goil/makefile-macosx} for Mac OS X or \file{goil/makefile-unix}. Then type \tool{./build.py release}. If everything went well, a \tool{goil} executable is generated. You can test it by typing \tool{./goil --version}. At the time of writing, the command should output:

\begin{verbatim}
alflolol:makefile-macosx jlb$ ./goil --version
./goil : 3.1.1, build with GALGAS 3.2.12
No warning, no error.
\end{verbatim}

You can install \tool{goil} in \file{/usr/local/bin} by typing \tool{sudo ./build.py install-release} or adding to your \envvar{PATH} environment the location where \goil\ has been compiled.

\section{Playing with the \cdata{one_task} application}

Go into the \file{examples/posix/one_task} directory.